To export a diagram to a bitmap, use the DiagramBitmapRenderer class. Renderers are supplied out of the box for exporting diagrams to PNG, JPEG and BMP format, and renderers can be easily created to support other formats such as GIF or TIFF.

Rendering a Bitmap

To render a diagram to a bitmap, call the Render method, passing the DiagramSurface you want to render:

CopyC#
DiagramBitmapRenderer.Png.Render(ds, filename);

Rendering to New Formats

To render to a format that is not supported out of the box, e.g. GIF or TIFF, create a subclass of DiagramBitmapRenderer and override the GetBitmapEncoder method.